Skip to content

More typed arrays in the FrameTable (and a flags column) - #6173

Draft
mstange wants to merge 1 commit into
firefox-devtools:mainfrom
mstange:frametable-flags
Draft

More typed arrays in the FrameTable (and a flags column)#6173
mstange wants to merge 1 commit into
firefox-devtools:mainfrom
mstange:frametable-flags

Conversation

@mstange

@mstange mstange commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

@codecov

codecov Bot commented Jul 13, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.77307% with 37 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.82%. Comparing base (9203f11) to head (ef6c4ae).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
src/profile-logic/bottom-box.ts 0.00% 8 Missing ⚠️
src/profile-logic/merge-compare.ts 68.75% 4 Missing and 1 partial ⚠️
src/profile-logic/symbolication.ts 86.66% 4 Missing ⚠️
src/test/fixtures/profile-summary.ts 55.55% 4 Missing ⚠️
src/profile-logic/js-tracer.ts 83.33% 2 Missing ⚠️
src/profile-logic/line-timings.ts 87.50% 2 Missing ⚠️
src/profile-logic/processed-profile-versioning.ts 95.74% 2 Missing ⚠️
src/profile-logic/profile-compacting.ts 94.87% 1 Missing and 1 partial ⚠️
src/profile-logic/profile-data.ts 96.22% 2 Missing ⚠️
src/profile-query/function-list.ts 0.00% 2 Missing ⚠️
... and 4 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6173      +/-   ##
==========================================
+ Coverage   83.79%   83.82%   +0.03%     
==========================================
  Files         350      351       +1     
  Lines       37583    37746     +163     
  Branches    10459    10652     +193     
==========================================
+ Hits        31492    31640     +148     
- Misses       5664     5677      +13     
- Partials      427      429       +2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mstange
mstange force-pushed the frametable-flags branch 2 times, most recently from b9ad978 to c49cdae Compare July 15, 2026 19:22
So far, the columns we've converted to typed arrays were either
always non-empty, or they used -1 as the "no value" sentinel.
For the FrameTable, I've opted to not to use -1 sentinel values,
and instead have a flags column with a "HasXYZ" flag for each column
(e.g. FrameFlags.HasAddress), for the following reasons:
- I'd like to use U8 and U16 arrays for the category and subcategory
  columns. That's already what we use in the derived StackTable.
  With an external flag we can go up to 256 subcategories without
  having to use 16 bits.
- I'm changing the inlineDepth column into just a "is inline" bool.
  This is a good fit for a flag.
- The address column was using -1 as the "no address" sentinel; having
  the flag lets us use U32 instead of I32 for the address column and
  have relative addresses for 4GiB binaries rather than just 2GiB.

An alternative I considered (but discarded) was to have a bitset for
each column. E.g. one "isInlined" bitset where, in the JSON, each item
is a U8 with the bits for 8 different frames. And similarly we could
have a "hasCategory" bitset. But that was too many extra columns in my
opinion.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant